<?php

namespace app\admin\validate\music;

use think\Validate;

class MusicValidate extends Validate
{
    protected $rule=array(
        "id"=>"require",
        "title"=>"require",
        "user_id"=>"require",
        "img"=>"require",
        "url"=>"require",
        "single_status"=>"require",
        "price"=>"require",
        "content"=>"require",
    );
    protected $message=array(
        "id|require"=>"id为空",
        "title|require"=>"标题不能为空",
        "user_id|require"=>"请选择创作者",
        "img|require"=>"请上传图片",
        "url|require"=>"请上传文件",
        "single_status|require"=>"请选择单曲是否展示",
        "price|require"=>"请输入金额",
        "content|require"=>"请输入内容",
    );
    protected $scene=array(
        "create"=>array("title","img","url","user_id","single_status","price","content"),
        "update"=>array("id","title","img","url","user_id","single_status","price","content"),
    );
}